# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
#%% practice_1

import sympy as sy
# import numpy as np


# I表示虚数单位，这里为什么失败
c = 1+2*sy.I
# sy.arg(c).eval()

c.as_real_imag() # 列出实部和虚部

c.conjugate() # 共轭

abs(c) # 模

sy.arg(c)

sy.S('(1+2j)*(2+3j)').simplify()

#%% name

from sympy import re, im, I, E, symbols, pi, arg
import sympy
_a, _b, _z = symbols('a b z', real=True)
_z = _a * E ** (I * (pi / 6))
# im(_z)
# arg(_z)

a = (im(_z), arg(_z))
